<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <title>会员充值</title>
    <link href="<%=basePath%>css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $('tbody tr:odd').addClass("trLight");
            $(".select-all").click(function(){
                if($(this).attr("checked")){
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", true);
                    });
                }else{
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", false);
                    });
                }
            });

        });
    </script>
    <script type="text/javascript">
        function back(){
            history.go(-1);
        }
        function add(){
            var moneys =document.getElementById("moneys").value;
            if(moneys==null||moneys==''){
                alert("请输入");
            }else{
                if(!isNaN(moneys)){
                    document.ThisForm.submit();
                } else {
                    alert("不是数字");
                }
            }
        }
    </script>
    <style type="text/css">
        body {
            background:#FFF
        }
    </style>
</head>

<body>
<form method="post" action="<%=basePath%>fyUpdateczController" method="post" name="ThisForm">
    <input  type="hidden" id="id" name="memberid" value="${mem.memberid}"/>
    <div id="contentWrap">
        <!--表格控件 -->
        <div id="widget table-widget">
            <div class="pageTitle">会员充值</div>
            <font color="green" size="14">${success }</font>
            <div class="pageInfo">
                <table>
                    <tr>
                        <td width="">目前现有金额</td>
                        <td width=""><input type="text" id="before" name="balance1" value="${mem.balance}"/></td>
                        <td width="10%" align="right">充值额</td>
                        <td width="20%"><input type="text" id="moneys" name="balance" /></td>
                        <td width="10%" align="right">充值方式</td>
                        <td width="50%">
                            <select id="type" name="type" >
                                <option value="">请选择</option>
                                <c:if test="${mem.type=='1'}"> <option value="1" selected>现金</option></c:if>
                                <c:if test="${mem.type!='1'}"> <option value="1" >现金</option></c:if>
                                <c:if test="${mem.type=='2'}"> <option value="2" selected>刷卡</option></c:if>
                                <c:if test="${mem.type!='2'}"> <option value="2" >刷卡</option></c:if>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" align="center"><input type="button" value="确定" onclick="add()"/> </td>
                    </tr>
                </table>
            </div>
        </div><!-- #widget -->
    </div>
</form>
</body>
</html>

